1. Field of the Invention
This invention relates in general to computer-implemented database management systems, and, in particular, to efficiently transmitting very large objects in a client/server environment.
2. Description of Related Art
Database management systems (DBMSs) are computerized information storage and retrieval systems. Relational database management systems (RDBMSs) are DBMSs that store and retrieve data that are organized as tables. A table consists of rows and columns of data. The rows are formally called tuples. A database will typically have many tables and each table will typically have multiple tuples and multiple columns.
DBMSs are frequently designed to store data having a variety of data types. With the recent developments in object technology, there is a push to incorporate object technology into a distributed relational database environment. For instance, a DBMS may have the capability of storing and retrieving data having standard data types, such as integers and characters, as well as non-standard data types, including very large data objects (LOBs). A typical DBMS represents text, voice, and image data as LOB types. Various applications and systems use data having LOB types. Exemplary applications and systems may involve multimedia applications for the World Wide Web; medical care applications (e.g., X-rays, MRI imaging, and EKG traces); and geographical, space, and exploration systems (e.g., maps, seismic data, and satellite images).
In conventional client-server systems, client applications reside on the client computer, and server applications reside on the server computer. Client computers and server computers are connected with a communication line (network), such as a local area network (LAN). The server computer may contain a DBMS and may be connected with one or more databases. A common client-server scenario involves a client application on the client computer requesting data (e.g., in the form of a database query) from a database on the server computer. The DBMS on the server computer processes the query to, retrieve data from the database. The retrieved data can include LOB data (i.e., data having a LOB data type).
Transmitting LOB data over a network generally consumes a large amount of bandwidth and may significantly impact the performance of the network, the database, and/or applications involved in fetching the LOB data from the database.
For instance, in response to a query from an application, the client computer contacts the server computer. The response to the query may contain LOB data. The current approach to returning the response to the client computer generally involves returning a row of data having both standard and non-standard data types. An exemplary row may have columns 1, 2, and 3, with columns 1 and 3 containing data having standard data types(e.g., integers or characters). Column 2 could contain data having a non-standard data type (e.g., LOB data that consumes two megabytes of space in a data storage device). When a row containing these three columns is transmitted from the server computer to the client computer, data is typically transmitted sequentially. Therefore, the client computer first receives the column 1 data having a standard database data type, receives the column 2 data having a non-standard data type, and then receives the column 3 data having a standard database data type. These columns of data are typically stored in a temporary storage location and then moved to the application""s storage. Because the LOB data in column 2 is large in size, additional time and/or temporary storage space is required to receive the column 2 data.
Processing typically used for handling standard data columns, which are defined by small volumes of data, may be inefficient when the data columns are defined by larger volumes of data. Thus, there is a need for a technique of realizing efficiencies throughout the processing of non-standard data columns, such as when moving data into the application""s storage.
To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a method, apparatus, and article of manufacture for transmitting data having non-standard data types between computers.
In accordance with the present invention, a query is executed to retrieve data from a database. The database comprises data having standard data types, data having small non-standard data types, and data having large non-standard data types, and is stored on a data storage device connected to a server computer. At the server computer, data having standard and non-standard data types is retrieved. An answer set is generated that comprises data having standard data types, data having small non-standard data types, and one or more placeholders, wherein each placeholder represents data having large non-standard data types. The generated answer set is transmitted to a client computer. After transmitting the generated answer set, data represented by each placeholder in the answer set is transmitted to the client computer.
An objective of an embodiment of the present invention is to separate data having large non-standard data types from data having standard data types and data having small non-standard data types, when transmitting data between a client and server computer. A further objective of an embodiment of the present invention is to allow either the client or server computer to control the quantity of large non-standard data types received at the client computer 102 when the answer set contains multiple rows (commonly referred to as a block of rows). Another object of an embodiment of the present invention is to optimize data movement at various stages in the processing.